|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--javabook2.JavaBookDialog
This abstract class defines behavior and data members common to javabook dialogs such as MessageBox, InputBox, and others. You can use this class as the superclass of your own dialog box. In this Swing version of javabook, the JOptionPane class is used extensively. Many functionalities coded inside the original javabook package are now handled automatically by the JOptionPane class.
This class is provided as freeware. You are free to use as provided or modify to your heart's content. But you use it at your own risk. No implied or explicit warranty is given.
| Field Summary | |
static int |
ERROR_ICON
Constant for the error icon |
static int |
INFO_ICON
Constant for the information icon |
static int |
NO_ICON
Constant for no icon |
static int |
QUESTION_ICON
Constant for the question icon |
static int |
WARNING_ICON
Constant for the warning icon |
| Constructor Summary | |
JavaBookDialog(java.awt.Component owner)
|
|
JavaBookDialog(java.awt.Component owner,
boolean modal)
|
|
| Method Summary | |
protected void |
createDialog()
Creates a dialog based on the values set for title, message, and icon. |
protected int |
getIcon()
Returns the currently set icon. |
protected java.awt.Component |
getOwner()
Returns the owner parent of this dialog |
protected java.lang.String |
getTitle()
Returns the title of this dialog |
void |
setIcon(int icon)
Sets the icon of this dialog |
void |
setLocation(int x,
int y)
Sets the location of this dialog. |
protected void |
setMessage(java.lang.Object message)
Sets the message content of this dialog. |
protected void |
setModal(boolean modality)
Sets the modality of this dialog. |
void |
setTitle(java.lang.String title)
Sets the title of this dialog |
protected void |
show()
Shows this dialog |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NO_ICON
public static final int INFO_ICON
public static final int ERROR_ICON
public static final int WARNING_ICON
public static final int QUESTION_ICON
| Constructor Detail |
public JavaBookDialog(java.awt.Component owner)
public JavaBookDialog(java.awt.Component owner,
boolean modal)
| Method Detail |
public void setIcon(int icon)
icon - an icon to display on this dialog
public void setLocation(int x,
int y)
x - the x coordinate of this dialog's origin relative to the screeny - the y coordinate of this dialog's origin relative to the screenpublic void setTitle(java.lang.String title)
title - a new title for this dialogprotected void createDialog()
protected int getIcon()
protected java.awt.Component getOwner()
protected java.lang.String getTitle()
protected void setMessage(java.lang.Object message)
Object - the message content of this dialogprotected void setModal(boolean modality)
modality - true for modal; false for modelessprotected void show()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||